Termination of the following Term Rewriting System could not be shown:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The replacement map contains the following entries:

p: {1}
0: empty set
s: {1}
leq: {1, 2}
true: empty set
false: empty set
if: {1}
diff: {1, 2}


CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Context-sensitive rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The replacement map contains the following entries:

p: {1}
0: empty set
s: {1}
leq: {1, 2}
true: empty set
false: empty set
if: {1}
diff: {1, 2}

The CSR is orthogonal. By [10] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
CSR
      ↳ CSDependencyPairsProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Context-sensitive rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The replacement map contains the following entries:

p: {1}
0: empty set
s: {1}
leq: {1, 2}
true: empty set
false: empty set
if: {1}
diff: {1, 2}

Innermost Strategy.

Using Improved CS-DPs we result in the following initial Q-CSDP problem.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
QCSDP
          ↳ QCSDependencyGraphProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, LEQ, DIFF, P} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The ordinary context-sensitive dependency pairs DPo are:

LEQ(s(X), s(Y)) → LEQ(X, Y)
DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
DIFF(X, Y) → LEQ(X, Y)

The collapsing dependency pairs are DPc:

IF(true, X, Y) → X
IF(false, X, Y) → Y


The hidden terms of R are:

diff(p(X), Y)
p(X)

Every hiding context is built from:

p on positions {1}
diff on positions {1, 2}
s on positions {1}

Hence, the new unhiding pairs DPu are :

IF(true, X, Y) → U(X)
IF(false, X, Y) → U(Y)
U(p(x_0)) → U(x_0)
U(diff(x_0, x_1)) → U(x_0)
U(diff(x_0, x_1)) → U(x_1)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
U(p(X)) → P(X)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


The approximation of the Context-Sensitive Dependency Graph contains 2 SCCs with 2 less nodes.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
QCSDP
                ↳ QCSDPSubtermProof
              ↳ QCSDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, LEQ} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:

LEQ(s(X), s(Y)) → LEQ(X, Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


We use the subterm processor [20].


The following pairs can be oriented strictly and are deleted.


LEQ(s(X), s(Y)) → LEQ(X, Y)
The remaining pairs can at least be oriented weakly.
none
Used ordering: Combined order from the following AFS and order.
LEQ(x1, x2)  =  x1

Subterm Order


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
                ↳ QCSDPSubtermProof
QCSDP
                    ↳ PIsEmptyProof
              ↳ QCSDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff} are replacing on all positions.
For all symbols f in {if} we have µ(f) = {1}.

The TRS P consists of the following rules:
none

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


The TRS P is empty. Hence, there is no (P,Q,R,µ)-chain.

↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
QCSDP
                ↳ QCSDPReductionPairProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, DIFF} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
IF(true, X, Y) → U(X)
U(p(x_0)) → U(x_0)
U(diff(x_0, x_1)) → U(x_0)
U(diff(x_0, x_1)) → U(x_1)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
IF(false, X, Y) → U(Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


Using the order
Polynomial interpretation [25]:

POL(0) = 0   
POL(DIFF(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(IF(x1, x2, x3)) = 2·x2 + 2·x3   
POL(U(x1)) = 2·x1   
POL(diff(x1, x2)) = 1 + x1 + x2   
POL(false) = 0   
POL(if(x1, x2, x3)) = 2·x1 + 2·x2 + x3   
POL(leq(x1, x2)) = 0   
POL(p(x1)) = x1   
POL(s(x1)) = x1   
POL(true) = 0   

the following usable rules

leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
p(0) → 0
p(s(X)) → X
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))
if(true, X, Y) → X
if(false, X, Y) → Y

could all be oriented weakly.
Furthermore, the pairs

U(diff(x_0, x_1)) → U(x_0)
U(diff(x_0, x_1)) → U(x_1)

could be oriented strictly and thus removed.
The pairs

DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
IF(true, X, Y) → U(X)
U(p(x_0)) → U(x_0)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
IF(false, X, Y) → U(Y)

could only be oriented weakly and must be analyzed further.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPReductionPairProof
QCSDP
                    ↳ QCSDPReductionPairProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, DIFF} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
IF(true, X, Y) → U(X)
U(p(x_0)) → U(x_0)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
IF(false, X, Y) → U(Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


Using the order
Polynomial interpretation [25]:

POL(0) = 0   
POL(DIFF(x1, x2)) = 0   
POL(IF(x1, x2, x3)) = 2·x2 + x3   
POL(U(x1)) = x1   
POL(diff(x1, x2)) = 0   
POL(false) = 0   
POL(if(x1, x2, x3)) = 2·x2 + x3   
POL(leq(x1, x2)) = 1   
POL(p(x1)) = 1 + 2·x1   
POL(s(x1)) = 2·x1   
POL(true) = 0   

the following usable rules

leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
p(0) → 0
p(s(X)) → X
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))
if(true, X, Y) → X
if(false, X, Y) → Y

could all be oriented weakly.
Furthermore, the pairs

U(p(x_0)) → U(x_0)

could be oriented strictly and thus removed.
The pairs

DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
IF(true, X, Y) → U(X)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
IF(false, X, Y) → U(Y)

could only be oriented weakly and must be analyzed further.


↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPReductionPairProof
                  ↳ QCSDP
                    ↳ QCSDPReductionPairProof
QCSDP
                        ↳ QCSDPNarrowingProcessor
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, DIFF} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
IF(true, X, Y) → U(X)
U(s(x_0)) → U(x_0)
U(diff(p(X), Y)) → DIFF(p(X), Y)
IF(false, X, Y) → U(Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


Using the Context-Sensitive Narrowing Processor
the pair DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))
was transformed to the following new pairs:

DIFF(0, y1) → IF(true, 0, s(diff(p(0), y1)))
DIFF(s(x0), 0) → IF(false, 0, s(diff(p(s(x0)), 0)))
DIFF(s(x0), s(x1)) → IF(leq(x0, x1), 0, s(diff(p(s(x0)), s(x1))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPReductionPairProof
                  ↳ QCSDP
                    ↳ QCSDPReductionPairProof
                      ↳ QCSDP
                        ↳ QCSDPNarrowingProcessor
QCSDP
                            ↳ QCSDPNarrowingProcessor
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, DIFF} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

DIFF(0, y1) → IF(true, 0, s(diff(p(0), y1)))
IF(false, X, Y) → U(Y)
DIFF(s(x0), s(x1)) → IF(leq(x0, x1), 0, s(diff(p(s(x0)), s(x1))))
U(diff(p(X), Y)) → DIFF(p(X), Y)
U(s(x_0)) → U(x_0)
IF(true, X, Y) → U(X)
DIFF(s(x0), 0) → IF(false, 0, s(diff(p(s(x0)), 0)))

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


Using the Context-Sensitive Narrowing Processor
the pair DIFF(s(x0), s(x1)) → IF(leq(x0, x1), 0, s(diff(p(s(x0)), s(x1))))
was transformed to the following new pairs:

DIFF(s(0), s(y1)) → IF(true, 0, s(diff(p(s(0)), s(y1))))
DIFF(s(s(x0)), s(0)) → IF(false, 0, s(diff(p(s(s(x0))), s(0))))
DIFF(s(s(x0)), s(s(x1))) → IF(leq(x0, x1), 0, s(diff(p(s(s(x0))), s(s(x1)))))



↳ CSR
  ↳ CSRInnermostProof
    ↳ CSR
      ↳ CSDependencyPairsProof
        ↳ QCSDP
          ↳ QCSDependencyGraphProof
            ↳ AND
              ↳ QCSDP
              ↳ QCSDP
                ↳ QCSDPReductionPairProof
                  ↳ QCSDP
                    ↳ QCSDPReductionPairProof
                      ↳ QCSDP
                        ↳ QCSDPNarrowingProcessor
                          ↳ QCSDP
                            ↳ QCSDPNarrowingProcessor
QCSDP
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation

Q-restricted context-sensitive dependency pair problem:
The symbols in {p, s, leq, diff, DIFF} are replacing on all positions.
For all symbols f in {if, IF} we have µ(f) = {1}.
The symbols in {U} are not replacing on any position.

The TRS P consists of the following rules:

IF(false, X, Y) → U(Y)
DIFF(0, y1) → IF(true, 0, s(diff(p(0), y1)))
DIFF(s(s(x0)), s(0)) → IF(false, 0, s(diff(p(s(s(x0))), s(0))))
U(diff(p(X), Y)) → DIFF(p(X), Y)
U(s(x_0)) → U(x_0)
DIFF(s(s(x0)), s(s(x1))) → IF(leq(x0, x1), 0, s(diff(p(s(s(x0))), s(s(x1)))))
IF(true, X, Y) → U(X)
DIFF(s(0), s(y1)) → IF(true, 0, s(diff(p(s(0)), s(y1))))
DIFF(s(x0), 0) → IF(false, 0, s(diff(p(s(x0)), 0)))

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


We applied the Incomplete Giesl Middeldorp transformation [11] to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
QTRS
      ↳ DependencyPairsProof
  ↳ Trivial-Transformation

Q restricted rewrite system:
The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(x1)) → PACTIVE(mark(x1))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(if(x1, x2, x3)) → MARK(x1)
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(x1, x2)) → MARK(x1)
MARK(leq(x1, x2)) → LEQACTIVE(mark(x1), mark(x2))
MARK(p(x1)) → MARK(x1)
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(x1)) → PACTIVE(mark(x1))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(if(x1, x2, x3)) → MARK(x1)
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(x1, x2)) → MARK(x1)
MARK(leq(x1, x2)) → LEQACTIVE(mark(x1), mark(x2))
MARK(p(x1)) → MARK(x1)
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(p(x1)) → PACTIVE(mark(x1)) at position [0] we obtained the following new rules:

MARK(p(true)) → PACTIVE(true)
MARK(p(false)) → PACTIVE(false)
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(0)) → PACTIVE(0)
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
QDP
              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(p(true)) → PACTIVE(true)
MARK(diff(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(p(false)) → PACTIVE(false)
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(p(0)) → PACTIVE(0)
MARK(leq(x1, x2)) → LEQACTIVE(mark(x1), mark(x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
QDP
                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(x1, x2)) → LEQACTIVE(mark(x1), mark(x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(x1, x2)) → LEQACTIVE(mark(x1), mark(x2)) at position [0] we obtained the following new rules:

MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(leq(true, y1)) → LEQACTIVE(true, mark(y1))
MARK(leq(false, y1)) → LEQACTIVE(false, mark(y1))
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(0, y1)) → LEQACTIVE(0, mark(y1))
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
QDP
                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(false, y1)) → LEQACTIVE(false, mark(y1))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(true, y1)) → LEQACTIVE(true, mark(y1))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(0, y1)) → LEQACTIVE(0, mark(y1))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
QDP
                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(if(x1, x2, x3)) → IFACTIVE(mark(x1), x2, x3) at position [0] we obtained the following new rules:

MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(if(0, y1, y2)) → IFACTIVE(0, y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(s(x0), y1, y2)) → IFACTIVE(s(mark(x0)), y1, y2)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
QDP
                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(if(s(x0), y1, y2)) → IFACTIVE(s(mark(x0)), y1, y2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
DIFFACTIVE(X, Y) → MARK(X)
MARK(if(0, y1, y2)) → IFACTIVE(0, y1, y2)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 2 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
QDP
                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(p(x0), y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), true)) → LEQACTIVE(pActive(mark(y0)), true)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(p(y0), 0)) → LEQACTIVE(pActive(mark(y0)), 0)
MARK(leq(p(y0), false)) → LEQACTIVE(pActive(mark(y0)), false)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
QDP
                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(p(y0), 0)) → LEQACTIVE(pActive(mark(y0)), 0)
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), false)) → LEQACTIVE(pActive(mark(y0)), false)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), true)) → LEQACTIVE(pActive(mark(y0)), true)
LEQACTIVE(s(X), s(Y)) → MARK(X)
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
QDP
                                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(if(x0, x1, x2), y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(if(y0, y1, y2), true)) → LEQACTIVE(ifActive(mark(y0), y1, y2), true)
MARK(leq(if(y0, y1, y2), false)) → LEQACTIVE(ifActive(mark(y0), y1, y2), false)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), 0)) → LEQACTIVE(ifActive(mark(y0), y1, y2), 0)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
QDP
                                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(if(y0, y1, y2), 0)) → LEQACTIVE(ifActive(mark(y0), y1, y2), 0)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), true)) → LEQACTIVE(ifActive(mark(y0), y1, y2), true)
MARK(leq(if(y0, y1, y2), false)) → LEQACTIVE(ifActive(mark(y0), y1, y2), false)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
QDP
                                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(diff(x0, x1), y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(diff(y0, y1), true)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), true)
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), 0)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), 0)
MARK(leq(diff(y0, y1), false)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), false)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
QDP
                                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(leq(diff(y0, y1), true)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), true)
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(diff(y0, y1), 0)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), 0)
MARK(leq(diff(y0, y1), false)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), false)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
QDP
                                                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
IFACTIVE(true, X, Y) → MARK(X)
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(s(x0), y1)) → LEQACTIVE(s(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(s(y0), false)) → LEQACTIVE(s(mark(y0)), false)
MARK(leq(s(y0), 0)) → LEQACTIVE(s(mark(y0)), 0)
MARK(leq(s(y0), true)) → LEQACTIVE(s(mark(y0)), true)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
QDP
                                                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(diff(x1, x2)) → MARK(x1)
MARK(leq(s(y0), 0)) → LEQACTIVE(s(mark(y0)), 0)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(s(y0), false)) → LEQACTIVE(s(mark(y0)), false)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), true)) → LEQACTIVE(s(mark(y0)), true)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
QDP
                                                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule MARK(leq(leq(x0, x1), y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

MARK(leq(leq(y0, y1), 0)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), 0)
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), true)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), true)
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), false)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), false)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
QDP
                                                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(leq(y0, y1), true)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), true)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(leq(leq(y0, y1), false)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), false)
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(leq(y0, y1), 0)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), 0)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
QDP
                                                                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(X), s(Y)) → LEQACTIVE(mark(X), mark(Y)) at position [0] we obtained the following new rules:

LEQACTIVE(s(0), s(y1)) → LEQACTIVE(0, mark(y1))
LEQACTIVE(s(false), s(y1)) → LEQACTIVE(false, mark(y1))
LEQACTIVE(s(leq(x0, x1)), s(y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(true), s(y1)) → LEQACTIVE(true, mark(y1))
LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
QDP
                                                                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
LEQACTIVE(s(0), s(y1)) → LEQACTIVE(0, mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(true), s(y1)) → LEQACTIVE(true, mark(y1))
LEQACTIVE(s(leq(x0, x1)), s(y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(false), s(y1)) → LEQACTIVE(false, mark(y1))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
QDP
                                                                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(leq(x0, x1)), s(y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(leq(x0, x1)), s(y1)) → LEQACTIVE(leqActive(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(true)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), true)
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(false)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), false)
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(0)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), 0)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
QDP
                                                                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(leq(y0, y1)), s(true)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), true)
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(0)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), 0)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
LEQACTIVE(s(leq(y0, y1)), s(false)) → LEQACTIVE(leqActive(mark(y0), mark(y1)), false)
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
QDP
                                                                                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(diff(x0, x1)), s(y1)) → LEQACTIVE(diffActive(mark(x0), mark(x1)), mark(y1)) at position [1] we obtained the following new rules:

LEQACTIVE(s(diff(y0, y1)), s(true)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), true)
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(0)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), 0)
LEQACTIVE(s(diff(y0, y1)), s(false)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), false)
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
QDP
                                                                                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(0)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), 0)
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(false)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), false)
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(diff(y0, y1)), s(true)) → LEQACTIVE(diffActive(mark(y0), mark(y1)), true)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
QDP
                                                                                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(s(x0)), s(y1)) → LEQACTIVE(s(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

LEQACTIVE(s(s(y0)), s(0)) → LEQACTIVE(s(mark(y0)), 0)
LEQACTIVE(s(s(y0)), s(false)) → LEQACTIVE(s(mark(y0)), false)
LEQACTIVE(s(s(y0)), s(true)) → LEQACTIVE(s(mark(y0)), true)
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
QDP
                                                                                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(s(y0)), s(false)) → LEQACTIVE(s(mark(y0)), false)
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(true)) → LEQACTIVE(s(mark(y0)), true)
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(s(y0)), s(0)) → LEQACTIVE(s(mark(y0)), 0)
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
QDP
                                                                                                          ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
PACTIVE(s(X)) → MARK(X)
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(if(x0, x1, x2)), s(y1)) → LEQACTIVE(ifActive(mark(x0), x1, x2), mark(y1)) at position [1] we obtained the following new rules:

LEQACTIVE(s(if(y0, y1, y2)), s(true)) → LEQACTIVE(ifActive(mark(y0), y1, y2), true)
LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(false)) → LEQACTIVE(ifActive(mark(y0), y1, y2), false)
LEQACTIVE(s(if(y0, y1, y2)), s(0)) → LEQACTIVE(ifActive(mark(y0), y1, y2), 0)
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
QDP
                                                                                                              ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
LEQACTIVE(s(if(y0, y1, y2)), s(true)) → LEQACTIVE(ifActive(mark(y0), y1, y2), true)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(false)) → LEQACTIVE(ifActive(mark(y0), y1, y2), false)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(0)) → LEQACTIVE(ifActive(mark(y0), y1, y2), 0)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
QDP
                                                                                                                  ↳ Narrowing
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
PACTIVE(s(X)) → MARK(X)
LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1))
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule LEQACTIVE(s(p(x0)), s(y1)) → LEQACTIVE(pActive(mark(x0)), mark(y1)) at position [1] we obtained the following new rules:

LEQACTIVE(s(p(y0)), s(true)) → LEQACTIVE(pActive(mark(y0)), true)
LEQACTIVE(s(p(y0)), s(false)) → LEQACTIVE(pActive(mark(y0)), false)
LEQACTIVE(s(p(y0)), s(0)) → LEQACTIVE(pActive(mark(y0)), 0)
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
                                                                                                                ↳ QDP
                                                                                                                  ↳ Narrowing
QDP
                                                                                                                      ↳ DependencyGraphProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(false)) → LEQACTIVE(pActive(mark(y0)), false)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(true)) → LEQACTIVE(pActive(mark(y0)), true)
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(p(y0)), s(0)) → LEQACTIVE(pActive(mark(y0)), 0)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
                                                                                                                ↳ QDP
                                                                                                                  ↳ Narrowing
                                                                                                                    ↳ QDP
                                                                                                                      ↳ DependencyGraphProof
QDP
                                                                                                                          ↳ QDPOrderProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(p(leq(x0, x1))) → PACTIVE(leqActive(mark(x0), mark(x1)))
The remaining pairs can at least be oriented weakly.

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(DIFFACTIVE(x1, x2)) = 1   
POL(IFACTIVE(x1, x2, x3)) = 1   
POL(LEQACTIVE(x1, x2)) = 1   
POL(MARK(x1)) = 1   
POL(PACTIVE(x1)) = x1   
POL(diff(x1, x2)) = 0   
POL(diffActive(x1, x2)) = 1   
POL(false) = 0   
POL(if(x1, x2, x3)) = 1   
POL(ifActive(x1, x2, x3)) = 1   
POL(leq(x1, x2)) = 0   
POL(leqActive(x1, x2)) = 0   
POL(mark(x1)) = 1   
POL(p(x1)) = 0   
POL(pActive(x1)) = 1   
POL(s(x1)) = 1   
POL(true) = 0   

The following usable rules [17] were oriented:

pActive(x1) → p(x1)
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
leqActive(0, Y) → true
leqActive(s(X), 0) → false
pActive(0) → 0
ifActive(true, X, Y) → mark(X)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
mark(p(x1)) → pActive(mark(x1))
pActive(s(X)) → mark(X)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
ifActive(false, X, Y) → mark(Y)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(x1)) → s(mark(x1))
diffActive(x1, x2) → diff(x1, x2)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
                                                                                                                ↳ QDP
                                                                                                                  ↳ Narrowing
                                                                                                                    ↳ QDP
                                                                                                                      ↳ DependencyGraphProof
                                                                                                                        ↳ QDP
                                                                                                                          ↳ QDPOrderProof
QDP
                                                                                                                              ↳ QDPOrderProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


LEQACTIVE(s(if(y0, y1, y2)), s(leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), leq(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), leq(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(p(y0), leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), leq(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), leqActive(mark(x0), mark(x1)))
MARK(leq(s(y0), leq(x0, x1))) → LEQACTIVE(s(mark(y0)), leqActive(mark(x0), mark(x1)))
LEQACTIVE(s(p(y0)), s(leq(x0, x1))) → LEQACTIVE(pActive(mark(y0)), leqActive(mark(x0), mark(x1)))
The remaining pairs can at least be oriented weakly.

LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(DIFFACTIVE(x1, x2)) = 1   
POL(IFACTIVE(x1, x2, x3)) = 1   
POL(LEQACTIVE(x1, x2)) = x2   
POL(MARK(x1)) = 1   
POL(PACTIVE(x1)) = 1   
POL(diff(x1, x2)) = 1   
POL(diffActive(x1, x2)) = 1   
POL(false) = 0   
POL(if(x1, x2, x3)) = 0   
POL(ifActive(x1, x2, x3)) = 1   
POL(leq(x1, x2)) = 0   
POL(leqActive(x1, x2)) = 0   
POL(mark(x1)) = 1   
POL(p(x1)) = 0   
POL(pActive(x1)) = x1   
POL(s(x1)) = 1   
POL(true) = 0   

The following usable rules [17] were oriented:

pActive(x1) → p(x1)
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
leqActive(0, Y) → true
leqActive(s(X), 0) → false
pActive(0) → 0
ifActive(true, X, Y) → mark(X)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
mark(p(x1)) → pActive(mark(x1))
pActive(s(X)) → mark(X)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
ifActive(false, X, Y) → mark(Y)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(x1)) → s(mark(x1))
diffActive(x1, x2) → diff(x1, x2)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
                                                                                                                ↳ QDP
                                                                                                                  ↳ Narrowing
                                                                                                                    ↳ QDP
                                                                                                                      ↳ DependencyGraphProof
                                                                                                                        ↳ QDP
                                                                                                                          ↳ QDPOrderProof
                                                                                                                            ↳ QDP
                                                                                                                              ↳ QDPOrderProof
QDP
                                                                                                                                  ↳ QDPOrderProof
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
IFACTIVE(true, X, Y) → MARK(X)
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


MARK(leq(leq(y0, y1), if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(leq(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(leq(y0, y1)), s(s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
MARK(leq(leq(y0, y1), p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(leq(leq(y0, y1), diff(x0, x1))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
MARK(leq(leq(y0, y1), s(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(leq(y0, y1)), s(p(x0))) → LEQACTIVE(leqActive(mark(y0), mark(y1)), pActive(mark(x0)))
The remaining pairs can at least be oriented weakly.

LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
Used ordering: Polynomial interpretation [25]:

POL(0) = 0   
POL(DIFFACTIVE(x1, x2)) = 1   
POL(IFACTIVE(x1, x2, x3)) = 1   
POL(LEQACTIVE(x1, x2)) = x1   
POL(MARK(x1)) = 1   
POL(PACTIVE(x1)) = 1   
POL(diff(x1, x2)) = 0   
POL(diffActive(x1, x2)) = 1   
POL(false) = 0   
POL(if(x1, x2, x3)) = 0   
POL(ifActive(x1, x2, x3)) = 1   
POL(leq(x1, x2)) = 0   
POL(leqActive(x1, x2)) = 0   
POL(mark(x1)) = 1   
POL(p(x1)) = 0   
POL(pActive(x1)) = x1   
POL(s(x1)) = 1   
POL(true) = 0   

The following usable rules [17] were oriented:

pActive(x1) → p(x1)
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
leqActive(0, Y) → true
leqActive(s(X), 0) → false
pActive(0) → 0
ifActive(true, X, Y) → mark(X)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
mark(p(x1)) → pActive(mark(x1))
pActive(s(X)) → mark(X)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
ifActive(false, X, Y) → mark(Y)
mark(true) → true
mark(false) → false
mark(0) → 0
mark(s(x1)) → s(mark(x1))
diffActive(x1, x2) → diff(x1, x2)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ Narrowing
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ QDP
                  ↳ Narrowing
                    ↳ QDP
                      ↳ DependencyGraphProof
                        ↳ QDP
                          ↳ Narrowing
                            ↳ QDP
                              ↳ DependencyGraphProof
                                ↳ QDP
                                  ↳ Narrowing
                                    ↳ QDP
                                      ↳ DependencyGraphProof
                                        ↳ QDP
                                          ↳ Narrowing
                                            ↳ QDP
                                              ↳ DependencyGraphProof
                                                ↳ QDP
                                                  ↳ Narrowing
                                                    ↳ QDP
                                                      ↳ DependencyGraphProof
                                                        ↳ QDP
                                                          ↳ Narrowing
                                                            ↳ QDP
                                                              ↳ DependencyGraphProof
                                                                ↳ QDP
                                                                  ↳ Narrowing
                                                                    ↳ QDP
                                                                      ↳ DependencyGraphProof
                                                                        ↳ QDP
                                                                          ↳ Narrowing
                                                                            ↳ QDP
                                                                              ↳ DependencyGraphProof
                                                                                ↳ QDP
                                                                                  ↳ Narrowing
                                                                                    ↳ QDP
                                                                                      ↳ DependencyGraphProof
                                                                                        ↳ QDP
                                                                                          ↳ Narrowing
                                                                                            ↳ QDP
                                                                                              ↳ DependencyGraphProof
                                                                                                ↳ QDP
                                                                                                  ↳ Narrowing
                                                                                                    ↳ QDP
                                                                                                      ↳ DependencyGraphProof
                                                                                                        ↳ QDP
                                                                                                          ↳ Narrowing
                                                                                                            ↳ QDP
                                                                                                              ↳ DependencyGraphProof
                                                                                                                ↳ QDP
                                                                                                                  ↳ Narrowing
                                                                                                                    ↳ QDP
                                                                                                                      ↳ DependencyGraphProof
                                                                                                                        ↳ QDP
                                                                                                                          ↳ QDPOrderProof
                                                                                                                            ↳ QDP
                                                                                                                              ↳ QDPOrderProof
                                                                                                                                ↳ QDP
                                                                                                                                  ↳ QDPOrderProof
QDP
  ↳ Trivial-Transformation

Q DP problem:
The TRS P consists of the following rules:

LEQACTIVE(s(if(y0, y1, y2)), s(p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(Y)
MARK(leq(x1, x2)) → MARK(x2)
MARK(diff(x1, x2)) → MARK(x2)
MARK(leq(s(y0), if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(if(diff(x0, x1), y1, y2)) → IFACTIVE(diffActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(if(y0, y1, y2), if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(if(leq(x0, x1), y1, y2)) → IFACTIVE(leqActive(mark(x0), mark(x1)), y1, y2)
MARK(leq(diff(y0, y1), if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
MARK(if(x1, x2, x3)) → MARK(x1)
MARK(leq(if(y0, y1, y2), s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
MARK(if(true, y1, y2)) → IFACTIVE(true, y1, y2)
MARK(leq(x1, x2)) → MARK(x1)
LEQACTIVE(s(s(y0)), s(p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(p(x1)) → MARK(x1)
LEQACTIVE(s(p(y0)), s(s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(p(p(x0))) → PACTIVE(pActive(mark(x0)))
MARK(if(if(x0, x1, x2), y1, y2)) → IFACTIVE(ifActive(mark(x0), x1, x2), y1, y2)
LEQACTIVE(s(X), s(Y)) → MARK(Y)
MARK(leq(p(y0), diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
MARK(if(p(x0), y1, y2)) → IFACTIVE(pActive(mark(x0)), y1, y2)
MARK(leq(p(y0), s(x0))) → LEQACTIVE(pActive(mark(y0)), s(mark(x0)))
MARK(leq(s(y0), p(x0))) → LEQACTIVE(s(mark(y0)), pActive(mark(x0)))
MARK(leq(p(y0), p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
DIFFACTIVE(X, Y) → MARK(X)
MARK(leq(if(y0, y1, y2), p(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), pActive(mark(x0)))
LEQACTIVE(s(diff(y0, y1)), s(s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
LEQACTIVE(s(s(y0)), s(diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(diff(x1, x2)) → MARK(x1)
DIFFACTIVE(X, Y) → LEQACTIVE(mark(X), mark(Y))
MARK(s(x1)) → MARK(x1)
LEQACTIVE(s(diff(y0, y1)), s(p(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), pActive(mark(x0)))
LEQACTIVE(s(p(y0)), s(diff(x0, x1))) → LEQACTIVE(pActive(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(p(s(x0))) → PACTIVE(s(mark(x0)))
MARK(p(diff(x0, x1))) → PACTIVE(diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(s(y0)), s(if(x0, x1, x2))) → LEQACTIVE(s(mark(y0)), ifActive(mark(x0), x1, x2))
MARK(leq(diff(y0, y1), diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
IFACTIVE(true, X, Y) → MARK(X)
LEQACTIVE(s(s(y0)), s(s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
MARK(p(if(x0, x1, x2))) → PACTIVE(ifActive(mark(x0), x1, x2))
PACTIVE(s(X)) → MARK(X)
IFACTIVE(false, X, Y) → MARK(Y)
LEQACTIVE(s(if(y0, y1, y2)), s(if(x0, x1, x2))) → LEQACTIVE(ifActive(mark(y0), y1, y2), ifActive(mark(x0), x1, x2))
MARK(leq(s(y0), diff(x0, x1))) → LEQACTIVE(s(mark(y0)), diffActive(mark(x0), mark(x1)))
MARK(leq(diff(y0, y1), s(x0))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), s(mark(x0)))
DIFFACTIVE(X, Y) → IFACTIVE(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))
MARK(leq(s(y0), s(x0))) → LEQACTIVE(s(mark(y0)), s(mark(x0)))
LEQACTIVE(s(if(y0, y1, y2)), s(diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
MARK(if(false, y1, y2)) → IFACTIVE(false, y1, y2)
MARK(leq(if(y0, y1, y2), diff(x0, x1))) → LEQACTIVE(ifActive(mark(y0), y1, y2), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(if(y0, y1, y2)), s(s(x0))) → LEQACTIVE(ifActive(mark(y0), y1, y2), s(mark(x0)))
LEQACTIVE(s(p(y0)), s(p(x0))) → LEQACTIVE(pActive(mark(y0)), pActive(mark(x0)))
MARK(diff(x1, x2)) → DIFFACTIVE(mark(x1), mark(x2))
LEQACTIVE(s(diff(y0, y1)), s(if(x0, x1, x2))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(diff(y0, y1)), s(diff(x0, x1))) → LEQACTIVE(diffActive(mark(y0), mark(y1)), diffActive(mark(x0), mark(x1)))
LEQACTIVE(s(X), s(Y)) → MARK(X)
MARK(leq(p(y0), if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))
LEQACTIVE(s(p(y0)), s(if(x0, x1, x2))) → LEQACTIVE(pActive(mark(y0)), ifActive(mark(x0), x1, x2))

The TRS R consists of the following rules:

mark(p(x1)) → pActive(mark(x1))
pActive(x1) → p(x1)
mark(leq(x1, x2)) → leqActive(mark(x1), mark(x2))
leqActive(x1, x2) → leq(x1, x2)
mark(if(x1, x2, x3)) → ifActive(mark(x1), x2, x3)
ifActive(x1, x2, x3) → if(x1, x2, x3)
mark(diff(x1, x2)) → diffActive(mark(x1), mark(x2))
diffActive(x1, x2) → diff(x1, x2)
mark(0) → 0
mark(s(x1)) → s(mark(x1))
mark(true) → true
mark(false) → false
pActive(0) → 0
pActive(s(X)) → mark(X)
leqActive(0, Y) → true
leqActive(s(X), 0) → false
leqActive(s(X), s(Y)) → leqActive(mark(X), mark(Y))
ifActive(true, X, Y) → mark(X)
ifActive(false, X, Y) → mark(Y)
diffActive(X, Y) → ifActive(leqActive(mark(X), mark(Y)), 0, s(diff(p(X), Y)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We applied the Trivial transformation to transform the context-sensitive TRS to a usual TRS.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
QTRS
      ↳ Overlay + Local Confluence

Q restricted rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

Q is empty.

The TRS is overlay and locally confluent. By [19] we can switch to innermost.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
QTRS
          ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)


Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

DIFF(X, Y) → DIFF(p(X), Y)
LEQ(s(X), s(Y)) → LEQ(X, Y)
DIFF(X, Y) → P(X)
DIFF(X, Y) → LEQ(X, Y)
DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
QDP
              ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

DIFF(X, Y) → DIFF(p(X), Y)
LEQ(s(X), s(Y)) → LEQ(X, Y)
DIFF(X, Y) → P(X)
DIFF(X, Y) → LEQ(X, Y)
DIFF(X, Y) → IF(leq(X, Y), 0, s(diff(p(X), Y)))

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 2 SCCs with 3 less nodes.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
QDP
                    ↳ UsableRulesProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEQ(s(X), s(Y)) → LEQ(X, Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEQ(s(X), s(Y)) → LEQ(X, Y)

R is empty.
The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP
                            ↳ QDPSizeChangeProof
                  ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LEQ(s(X), s(Y)) → LEQ(X, Y)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
QDP
                    ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

DIFF(X, Y) → DIFF(p(X), Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X
leq(0, Y) → true
leq(s(X), 0) → false
leq(s(X), s(Y)) → leq(X, Y)
if(true, X, Y) → X
if(false, X, Y) → Y
diff(X, Y) → if(leq(X, Y), 0, s(diff(p(X), Y)))

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.

↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
QDP
                        ↳ QReductionProof

Q DP problem:
The TRS P consists of the following rules:

DIFF(X, Y) → DIFF(p(X), Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X

The set Q consists of the following terms:

p(0)
p(s(x0))
leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)

We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.

leq(0, x0)
leq(s(x0), 0)
leq(s(x0), s(x1))
if(true, x0, x1)
if(false, x0, x1)
diff(x0, x1)



↳ CSR
  ↳ CSRInnermostProof
  ↳ Incomplete Giesl Middeldorp-Transformation
  ↳ Trivial-Transformation
    ↳ QTRS
      ↳ Overlay + Local Confluence
        ↳ QTRS
          ↳ DependencyPairsProof
            ↳ QDP
              ↳ DependencyGraphProof
                ↳ AND
                  ↳ QDP
                  ↳ QDP
                    ↳ UsableRulesProof
                      ↳ QDP
                        ↳ QReductionProof
QDP

Q DP problem:
The TRS P consists of the following rules:

DIFF(X, Y) → DIFF(p(X), Y)

The TRS R consists of the following rules:

p(0) → 0
p(s(X)) → X

The set Q consists of the following terms:

p(0)
p(s(x0))

We have to consider all minimal (P,Q,R)-chains.